CREATE TABLE [dbo].[DnnProduct_LanguagePacks]
(
[LanguagePackID] [int] NOT NULL IDENTITY(1, 1),
[PackageID] [int] NOT NULL,
[DependentPackageID] [int] NOT NULL,
[LanguageID] [int] NOT NULL,
[CreatedByUserID] [int] NULL,
[CreatedOnDate] [datetime] NULL,
[LastModifiedByUserID] [int] NULL,
[LastModifiedOnDate] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_LanguagePacks] ADD CONSTRAINT [PK_DnnProduct_LanguagePacks] PRIMARY KEY CLUSTERED  ([LanguagePackID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DnnProduct_LanguagePacks] ON [dbo].[DnnProduct_LanguagePacks] ([LanguageID], [PackageID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_LanguagePacks] ADD CONSTRAINT [FK_DnnProduct_LanguagePacks_DnnProduct_Languages] FOREIGN KEY ([LanguageID]) REFERENCES [dbo].[DnnProduct_Languages] ([LanguageID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[DnnProduct_LanguagePacks] ADD CONSTRAINT [FK_DnnProduct_LanguagePacks_DnnProduct_Packages] FOREIGN KEY ([PackageID]) REFERENCES [dbo].[DnnProduct_Packages] ([PackageID]) ON DELETE CASCADE
GO
